-- order_guardian
-- created by shuzy
-- 状态： 秩序守护

return {
    fetchProps = function(who, status, condition)
        local mpCost = tonumber(condition["mp_cost"]);
        local damageReduce = tonumber(condition["damage_reduce"]);
        local endRound   = condition["end_round"];
        local props = {};
        local propId = PropM.getPropId("cost");

        table.insert(props, { propId, "mp", mpCost, endRound, });

        -- 减少伤害
        propId = PropM.getPropId("damage");
        table.insert(props, { propId, 1, damageReduce, endRound, });

        return props;
    end,

    desc = function(who, status, condition)
        -- 获取状态描述
        local cfg = CombatStatusM.getStatusInfo(status);
        local desc = cfg.desc;

        -- 效果，百分比
        local value = tonumber(condition["damage_reduce"]);

        desc = string.gsub(desc, "{value}", value / 10);

        return desc;
    end,
};
